3.2.91 \(\int \sin (a+b x) \sin ^n(c+d x) \, dx\) [191]

Optimal. Leaf size=293 \[ -\frac {2^{-1-n} e^{i (a-c n)+i (b-d n) x+i n (c+d x)} \left (1-e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \, _2F_1\left (-n,\frac {b-d n}{2 d};\frac {1}{2} \left (2+\frac {b}{d}-n\right );e^{2 i (c+d x)}\right )}{b-d n}-\frac {2^{-1-n} e^{-i (a+c n)-i (b+d n) x+i n (c+d x)} \left (1-e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \, _2F_1\left (-n,-\frac {b+d n}{2 d};1-\frac {b+d n}{2 d};e^{2 i (c+d x)}\right )}{b+d n} \]

[Out]

-2^(-1-n)*exp(I*(-c*n+a)+I*(-d*n+b)*x+I*n*(d*x+c))*(I/exp(I*(d*x+c))-I*exp(I*(d*x+c)))^n*hypergeom([-n, 1/2*(-
d*n+b)/d],[1+1/2*b/d-1/2*n],exp(2*I*(d*x+c)))/((1-exp(2*I*c+2*I*d*x))^n)/(-d*n+b)-2^(-1-n)*exp(-I*(c*n+a)-I*(d
*n+b)*x+I*n*(d*x+c))*(I/exp(I*(d*x+c))-I*exp(I*(d*x+c)))^n*hypergeom([-n, 1/2*(-d*n-b)/d],[1+1/2*(-d*n-b)/d],e
xp(2*I*(d*x+c)))/((1-exp(2*I*c+2*I*d*x))^n)/(d*n+b)

________________________________________________________________________________________

Rubi [A]
time = 0.59, antiderivative size = 293, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4649, 2323, 2285, 2284, 2283} \begin {gather*} -\frac {2^{-n-1} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \left (1-e^{2 i c+2 i d x}\right )^{-n} \, _2F_1\left (-n,\frac {b-d n}{2 d};\frac {1}{2} \left (\frac {b}{d}-n+2\right );e^{2 i (c+d x)}\right ) \exp (i (a-c n)+i x (b-d n)+i n (c+d x))}{b-d n}-\frac {2^{-n-1} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \left (1-e^{2 i c+2 i d x}\right )^{-n} \, _2F_1\left (-n,-\frac {b+d n}{2 d};1-\frac {b+d n}{2 d};e^{2 i (c+d x)}\right ) \exp (-i (a+c n)-i x (b+d n)+i n (c+d x))}{b+d n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x]*Sin[c + d*x]^n,x]

[Out]

-((2^(-1 - n)*E^(I*(a - c*n) + I*(b - d*n)*x + I*n*(c + d*x))*(I/E^(I*(c + d*x)) - I*E^(I*(c + d*x)))^n*Hyperg
eometric2F1[-n, (b - d*n)/(2*d), (2 + b/d - n)/2, E^((2*I)*(c + d*x))])/((1 - E^((2*I)*c + (2*I)*d*x))^n*(b -
d*n))) - (2^(-1 - n)*E^((-I)*(a + c*n) - I*(b + d*n)*x + I*n*(c + d*x))*(I/E^(I*(c + d*x)) - I*E^(I*(c + d*x))
)^n*Hypergeometric2F1[-n, -1/2*(b + d*n)/d, 1 - (b + d*n)/(2*d), E^((2*I)*(c + d*x))])/((1 - E^((2*I)*c + (2*I
)*d*x))^n*(b + d*n))

Rule 2283

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Simp
[a^p*(G^(h*(f + g*x))/(g*h*Log[G]))*Hypergeometric2F1[-p, g*h*(Log[G]/(d*e*Log[F])), g*h*(Log[G]/(d*e*Log[F]))
 + 1, Simplify[(-b/a)*F^(e*(c + d*x))]], x] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x] && (ILtQ[p, 0] || G
tQ[a, 0])

Rule 2284

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Dist
[(a + b*F^(e*(c + d*x)))^p/(1 + (b/a)*F^(e*(c + d*x)))^p, Int[G^(h*(f + g*x))*(1 + (b/a)*F^(e*(c + d*x)))^p, x
], x] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x] &&  !(ILtQ[p, 0] || GtQ[a, 0])

Rule 2285

Int[((a_) + (b_.)*(F_)^((e_.)*(v_)))^(p_)*(G_)^((h_.)*(u_)), x_Symbol] :> Int[G^(h*ExpandToSum[u, x])*(a + b*F
^(e*ExpandToSum[v, x]))^p, x] /; FreeQ[{F, G, a, b, e, h, p}, x] && LinearQ[{u, v}, x] &&  !LinearMatchQ[{u, v
}, x]

Rule 2323

Int[(u_.)*((a_.)*(F_)^(v_) + (b_.)*(F_)^(w_))^(n_), x_Symbol] :> Dist[(a*F^v + b*F^w)^n/(F^(n*v)*(a + b*F^Expa
ndToSum[w - v, x])^n), Int[u*F^(n*v)*(a + b*F^ExpandToSum[w - v, x])^n, x], x] /; FreeQ[{F, a, b, n}, x] &&  !
IntegerQ[n] && LinearQ[{v, w}, x]

Rule 4649

Int[Sin[(a_.) + (b_.)*(x_)]^(p_.)*Sin[(c_.) + (d_.)*(x_)]^(q_.), x_Symbol] :> Dist[1/2^(p + q), Int[ExpandInte
grand[(I/E^(I*(c + d*x)) - I*E^(I*(c + d*x)))^q, (I/E^(I*(a + b*x)) - I*E^(I*(a + b*x)))^p, x], x], x] /; Free
Q[{a, b, c, d, q}, x] && IGtQ[p, 0] &&  !IntegerQ[q]

Rubi steps

\begin {align*} \int \sin (a+b x) \sin ^n(c+d x) \, dx &=2^{-1-n} \int \left (i e^{-i a-i b x} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n-i e^{i a+i b x} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n\right ) \, dx\\ &=\left (i 2^{-1-n}\right ) \int e^{-i a-i b x} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \, dx-\left (i 2^{-1-n}\right ) \int e^{i a+i b x} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \, dx\\ &=\left (i 2^{-1-n} e^{i n (c+d x)} \left (i-i e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n\right ) \int e^{-i a-i b x-i n (c+d x)} \left (i-i e^{2 i c+2 i d x}\right )^n \, dx-\left (i 2^{-1-n} e^{i n (c+d x)} \left (i-i e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n\right ) \int e^{i a+i b x-i n (c+d x)} \left (i-i e^{2 i c+2 i d x}\right )^n \, dx\\ &=-\left (\left (i 2^{-1-n} e^{i n (c+d x)} \left (i-i e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n\right ) \int e^{i (a-c n)+i (b-d n) x} \left (i-i e^{2 i c+2 i d x}\right )^n \, dx\right )+\left (i 2^{-1-n} e^{i n (c+d x)} \left (i-i e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n\right ) \int e^{-i (a+c n)-i (b+d n) x} \left (i-i e^{2 i c+2 i d x}\right )^n \, dx\\ &=-\left (\left (i 2^{-1-n} e^{i n (c+d x)} \left (1-e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n\right ) \int e^{i (a-c n)+i (b-d n) x} \left (1-e^{2 i c+2 i d x}\right )^n \, dx\right )+\left (i 2^{-1-n} e^{i n (c+d x)} \left (1-e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n\right ) \int e^{-i (a+c n)-i (b+d n) x} \left (1-e^{2 i c+2 i d x}\right )^n \, dx\\ &=-\frac {2^{-1-n} \exp (i (a-c n)+i (b-d n) x+i n (c+d x)) \left (1-e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \, _2F_1\left (-n,\frac {b-d n}{2 d};\frac {1}{2} \left (2+\frac {b}{d}-n\right );e^{2 i (c+d x)}\right )}{b-d n}-\frac {2^{-1-n} \exp (-i (a+c n)-i (b+d n) x+i n (c+d x)) \left (1-e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \, _2F_1\left (-n,-\frac {b+d n}{2 d};1-\frac {b+d n}{2 d};e^{2 i (c+d x)}\right )}{b+d n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.94, size = 199, normalized size = 0.68 \begin {gather*} -\frac {e^{-i b x} \left (2-2 e^{2 i (c+d x)}\right )^{-n} \left (-i e^{-i (c+d x)} \left (-1+e^{2 i (c+d x)}\right )\right )^n \left ((b-d n) \, _2F_1\left (-n,-\frac {b+d n}{2 d};-\frac {b+d (-2+n)}{2 d};e^{2 i (c+d x)}\right ) (\cos (a)-i \sin (a))+e^{2 i b x} (b+d n) \, _2F_1\left (-n,\frac {b-d n}{2 d};\frac {1}{2} \left (2+\frac {b}{d}-n\right );e^{2 i (c+d x)}\right ) (\cos (a)+i \sin (a))\right )}{2 (b-d n) (b+d n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x]*Sin[c + d*x]^n,x]

[Out]

-1/2*((((-I)*(-1 + E^((2*I)*(c + d*x))))/E^(I*(c + d*x)))^n*((b - d*n)*Hypergeometric2F1[-n, -1/2*(b + d*n)/d,
 -1/2*(b + d*(-2 + n))/d, E^((2*I)*(c + d*x))]*(Cos[a] - I*Sin[a]) + E^((2*I)*b*x)*(b + d*n)*Hypergeometric2F1
[-n, (b - d*n)/(2*d), (2 + b/d - n)/2, E^((2*I)*(c + d*x))]*(Cos[a] + I*Sin[a])))/(E^(I*b*x)*(2 - 2*E^((2*I)*(
c + d*x)))^n*(b - d*n)*(b + d*n))

________________________________________________________________________________________

Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \sin \left (b x +a \right ) \left (\sin ^{n}\left (d x +c \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(b*x+a)*sin(d*x+c)^n,x)

[Out]

int(sin(b*x+a)*sin(d*x+c)^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(d*x+c)^n,x, algorithm="maxima")

[Out]

integrate(sin(d*x + c)^n*sin(b*x + a), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(d*x+c)^n,x, algorithm="fricas")

[Out]

integral(sin(d*x + c)^n*sin(b*x + a), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(d*x+c)**n,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(d*x+c)^n,x, algorithm="giac")

[Out]

integrate(sin(d*x + c)^n*sin(b*x + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \sin \left (a+b\,x\right )\,{\sin \left (c+d\,x\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)*sin(c + d*x)^n,x)

[Out]

int(sin(a + b*x)*sin(c + d*x)^n, x)

________________________________________________________________________________________